package com.canaan.business.service.inOutStock;

import java.util.List;

import com.canaan.business.domain.basic.WmsStorehouseLocation;
import com.canaan.business.domain.inOutStock.AdjustLocationBill;
import com.canaan.business.domain.storehouse.WmsStorehouseStock;

/**
 * 调库单Service接口
 * 
 * @author canaan
 * @date 2025-03-29
 */
public interface IAdjustLocationBillService {
    /**
     * 查询调库单
     *
     * @param id 调库单主键
     * @return 调库单
     */
    AdjustLocationBill selectAdjustLocationBillById(Long id);

    /**
     * 查询调库单列表
     * 
     * @param adjustLocationBill 调库单
     * @return 调库单集合
     */
    List<AdjustLocationBill> selectAdjustLocationBillList(AdjustLocationBill adjustLocationBill);

    /**
     * 新增调库单
     *
     * @param adjustLocationBill 调库单
     * @return 结果
     */
    int insertAdjustLocationBill(AdjustLocationBill adjustLocationBill);

    /**
     * 批量新增调库单
     *
     * @param adjustLocationBillList 调库单列表
     * @return 结果
     */
    int batchInsertAdjustLocationBill(List<AdjustLocationBill> adjustLocationBillList);

    /**
     * 修改调库单
     *
     * @param adjustLocationBill 调库单
     * @return 结果
     */
    int updateAdjustLocationBill(AdjustLocationBill adjustLocationBill);

    /**
     * 批量修改调库单
     *
     * @param adjustLocationBillList 调库单列表
     * @return 结果
     */
    int batchUpdateAdjustLocationBill(List<AdjustLocationBill> adjustLocationBillList);

    /**
     * 批量删除调库单
     * 
     * @param ids 需要删除的调库单主键集合
     * @return 结果
     */
    int deleteAdjustLocationBillByIds(Long[] ids);

    /**
     * 删除调库单信息
     * 
     * @param id 调库单主键
     * @return 结果
     */
    int deleteAdjustLocationBillById(Long id);

    /**
     * 查询调库单
     *
     * @param no 编号
     * @return 调库单
     */
    AdjustLocationBill selectAdjustLocationBillByNo(String no);

    /**
     * 批量删除调库单
     *
     * @param nos 需要删除的编号集合
     * @return 结果
     */
    int deleteAdjustLocationBillByNos(String[] nos);

    /**
     * 删除调库单信息
     *
     * @param no 编号
     * @return 结果
     */
    int deleteAdjustLocationBillByNo(String no);

    /**
     * 分析调库单
     */
    WmsStorehouseLocation generateAdjustDestLocation(String locationNo,String isInner,String innerLocation);

    /**
     * 生成调库单
     */
    void generateAdjustLocationBill(WmsStorehouseStock sourceStock, WmsStorehouseLocation sourceLocation, WmsStorehouseStock destStock, WmsStorehouseLocation destLocation, String billNo);
}
